
var dataArr = [
    {date:'12-29', num:1200},
    {date:'12-30', num:1400},
    {date:'12-31', num:1008},
    {date:'01-01', num:811},
    {date:'01-02', num:1026},
    {date:'01-03', num:1322},
    {date:'01-04', num:411}
];

option = {
    /*title: {
        text: '最近七天',
        //right: -15,
        top:0,
        textAlign: '50%',
        textStyle:{
            fontWeight:'normal',
            fontSize: 14
        }
    },*/
    tooltip: {
        trigger: 'axis',
        axisPointer: {
            lineStyle: {
                color: '#ddd'
            }
        },
        backgroundColor: 'rgba(255,255,255,1)',
        padding: [5, 10],
        textStyle: {
            color: '#7588E4',

        },
        extraCssText: 'box-shadow: 0 0 5px rgba(0,0,0,0.3)'
    },
    grid:{
        top:30,
        left:50,
        right:'5%'
    },
    legend: {
        right: 30,
        orient: 'vertical',
        data: ['近七天'],
        selectedMode: 'single'
    },
    xAxis: {
        type: 'category',
        data: [
            dataArr[0].date,
            dataArr[1].date,
            dataArr[2].date,
            dataArr[3].date,
            dataArr[4].date,
            dataArr[5].date,
            dataArr[6].date
        ],
        boundaryGap: false,
        splitLine: {
            show: true,
            interval: 'auto',
            lineStyle: {
                color: ['#D4DFF5']
            }
        },
        axisTick: {
            show: false
        },
        axisLine: {
            lineStyle: {
                color: '#609ee9'
            }
        },

        axisLabel: {
            margin: 10,
            textStyle: {
                fontSize: 14
            }
        }
    },
    yAxis: {
        type: 'value',
        splitLine: {
            lineStyle: {
                color: ['#D4DFF5']
            }
        },
        axisTick: {
            show: false
        },
        axisLine: {
            lineStyle: {
                color: '#609ee9'
            }
        },
        axisLabel: {
            margin: 10,
            textStyle: {
                fontSize: 14
            }
        }
    },
    series: {
        name: '近七天',
        type: 'line',
        smooth: true,
        showSymbol: false,
        symbol: 'circle',
        symbolSize: 6,
        data: [
            dataArr[0].num,
            dataArr[1].num,
            dataArr[2].num,
            dataArr[3].num,
            dataArr[4].num,
            dataArr[5].num,
            dataArr[6].num
        ],
        areaStyle: {
            normal: {
                color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
                    offset: 0,
                    color: 'rgba(199, 237, 250,0.5)'
                }, {
                    offset: 1,
                    color: 'rgba(199, 237, 250,0.2)'
                }], false)
            }
        },
        itemStyle: {
            normal: {
                color: '#f7b851'
            }
        },
        lineStyle: {
            normal: {
                width: 2
            }
        }
    }
};


var myChart2 = echarts.init(document.getElementById('bl_tu'));
myChart2.setOption(option);
window.onresize = myChart2.resize;